﻿using System.ComponentModel;
using System.ComponentModel.DataAnnotations;
using System.Web.Mvc;

namespace Web.Models
{
    public class News : Entity
    {
        [Key]
        public int Id { get; set; }

        [DisplayName("标题")]
        [StringLength(50)]
        public string Title { get; set; }

        [DisplayName("副标题")]
        [StringLength(100)]
        public string SubTitle { get; set; }

        [DisplayName("类别")]
        public int CategoryId { get; set; }
        public virtual Category Category { get; set; }

        [DisplayName("内容")]
        public string Profile { get; set; }

        [DisplayName("阅读量")]
        public int Hits { get; set; }
    }
}
